<template>
  <view class="Water">
    <mineNavbar :styleData="styleData" />

    <scroll-view class="scroll" scroll-y>
      <view class="logo">
        <image
          class=""
          src="@/static/images/aboutUs/bgLogo.png"
          mode="aspectFit|aspectFill|widthFix"
          lazy-load="false"
          binderror=""
          bindload="" />

        <view class="desc"> 零工就业招聘驿站 </view>
      </view>

      <view
        :class="{ 'c-item': true, write: isLastItem(index) }"
        v-for="(item, index) in items"
        :key="index"
        @click="toPath(item.path,item.type)">
        <text class="text"> {{ item.text }}</text>
        <image
          :src="item.imageSrc"
          mode="aspectFit|aspectFill|widthFix"
          lazy-load="false" />
      </view>
    </scroll-view>
  </view>
</template>

<script>

export default {
  components: {},
  data() {
    return {
      styleData: {
        show: true,
        tabbarText: "关于我们",
      },

      items: [
        {
          text: "服务协议",
          type:'1',
          imageSrc:
            "http://wangxinbao.oss-cn-beijing.aliyuncs.com/2024/04/11/4216bbbd8ac44bab98a3f90c8a5f28ec.png",
          path: "subPage/enterprise/mine/details/userAgreement",
        },
        {
          text: "隐私协议",
          type:'2',
          imageSrc:
            "http://wangxinbao.oss-cn-beijing.aliyuncs.com/2024/04/11/4216bbbd8ac44bab98a3f90c8a5f28ec.png",
          path: "subPage/enterprise/mine/details/privacy",
        },
        {
          text: "账号注销",
          imageSrc:
            "http://wangxinbao.oss-cn-beijing.aliyuncs.com/2024/04/11/4216bbbd8ac44bab98a3f90c8a5f28ec.png",
          path: "subPage/enterprise/mine/details/logOut",
        },
      ],
    };
  },
  computed: {},
  // 监控data中的数据变化
  watch: {},
  onLoad(options) {},
  onShow() {},
  onReady() {},
  methods: {
    toPath(path,type) {
      if (path === "") return;

      uni.navigateTo({
        url: `/${path}?type=${type}`,
      });
    },
    isLastItem(index) {
      return index === this.items.length - 1;
    },
  },
};
</script>
<style lang="scss" scoped>
.Water {
  height: 100vh;
  width: 100%;
  background-color: #f9f9f9;

  .scroll {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 24rpx;

    .logo {
      width: 188rpx;
      height: 188rpx;
      margin: 110rpx auto;

      image {
        width: 100%;
        height: 100%;
      }

      .desc {
        font-weight: 500;
        font-size: 24rpx;
        color: #00000073;
        letter-spacing: 0;
        text-align: center;
      }
    }

    .c-item {
      display: flex;
      align-items: center;
      justify-content: space-between;

      width: 702rpx;
      height: 98rpx;
      background: #ffffff;
      margin-bottom: 8rpx;

      .text {
        margin-left: 24rpx;
        font-weight: 600;
        font-size: 28rpx;
        color: #000000;
      }

      image {
        width: 35rpx;
        height: 35rpx;
        margin-right: 24rpx;
      }
    }

    .write {
      margin-top: 41rpx;
    }
  }
}
</style>
